﻿@using ZhouYu.DreamTour.Model;
@using ZhouYu.DreamTour.ViewModel;
@using ZhouYu.DreamTour.Web.Models;
@{
    TourDetailRelation tourDetailRelation = Model as TourDetailRelation;
    var GroupPicture = ViewBag.GroupPicture as List<TourPicture>;
    decimal price = tourDetailRelation.Price - tourDetailRelation.DiscountPrice;
    var Count = ViewBag.GetCount as ResponseResult;
    var UserInfo = UserInfoContext.userInfoContext.UserInfo;
}
<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>中国梦想游--旅游团购详情页</title>
    <link href="~/css/style.css" rel="stylesheet" type="text/css" />
    <link href="~/css/common.css" rel="stylesheet" type="text/css" />
    <link href="~/css/calendar.css" rel="stylesheet" type="text/css" />
    <script src="~/js/Calendar.js"></script>
    <script src="~/js/fun.js"></script>
    <script src="~/js/jquery.js"></script>
    <script type="text/javascript" src="~/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="~/js/imgtoggle.js"></script>
    <script type="text/javascript"></script>
    <script type="text/javascript" src="~/js/Format.js">
        window.onload = function () {
            var iTgl = new k_iToggle();
            iTgl.init({
                boxId: 'box',
                numId: 'num',
                imgId: 'imgs',
                isAuto: true,
                aCls: 'act',
                iCls: 'imgs1',
                direct: 'crt'
            });
            chg(iTgl, 'chg');
            _auto(iTgl, 'auto_1');

            //改变方向
            function chg(o, id) {
                $('#' + id).click(function () {
                    if (o.direct() == 'crt') {
                        o.direct('lvl');
                        $(this).text('纵向');
                    } else {
                        o.direct('crt');
                        $(this).text('横向');
                    }
                });
            }

            function _auto(o, id) {
                $('#' + id).click(function () {
                    if (o.isAuto) {
                        o.isAuto = false;
                        $(this).text('自动播放已停止');
                    } else {
                        o.isAuto = true;
                        o.auto();
                        $(this).text('自动播放');
                    }
                });
            }
        }
    </script>
    <script type="text/javascript">
        $(function () {
            var wweya_li = $("div.tab_menu ul li");
            wweya_li.click(function () {
                $(this).addClass("selected")
                    .siblings().removeClass("selected");
                var index = wweya_li.index(this);
                $("div.tab_box > div")
                    .eq(index).show(100)
                    .siblings().hide();
            }).hover(function () {
                $(this).addClass("hover");
            }, function () {
                $(this).removeClass("hover");
            });
        });
    </script>
</head>
<body>
    <div class="top_hw clearfix">
        <div class="top_h clearfix">
            <div class="top_hl"><span>欢迎来到中国梦想游，让你的梦想全程免费自由行！</span> 预定热线：<b>0571-63322269</b></div>
            <div class="top_hr">
                @if (UserInfo == null)
                {
                    <a href="/Home/User_Register">会员注册</a>
                    <span>|</span> <a href="/Home/User_Login">登录</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a>
                    @*<a>
                            欢迎你，来到新世界旅行网！
                        </a>*@
                }
                else
                {
                    <a href="/Home/User_Center">会员中心</a>
                    <span>|</span> <a href="#">梦想收藏</a> <span>|</span> <a href="#">设为首页</a> <span>|</span> <a href="/Login/LoginOut">退出</a> <span>|</span>
                    <a>
                        欢迎你，<span>@UserInfo.User_Name</span>来到新世界旅行网！
                    </a>
                }
            </div>
        </div>
    </div>
    <div class="head_w">
        <div class="head_t clearfix">
            <div class="logo"><img src="~/images/logo.jpg"></div>
            <div class="rx_line"><img src="~/images/rx.jpg"></div>
        </div>
    </div>
    <div class="mainNav clearfix">
        <ul class="Nav_ul">
            <li class="cur"><a href="/Home/Index">首页</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Route">旅游路线</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Scenic">旅游景点</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/CateringAccommodation">餐饮住宿</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Traffic_DatailsOne">交通线路</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Group">旅游团购</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Specialty">地方特产</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/AutoGenerationIntro">自动生成简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Team_Join">团队简介</a><img src="~/images/nav_line.jpg"></li>
            <li><a href="/Home/Itinerary_Details">行程导航</a></li>
        </ul>
    </div>
    <div class="b_wrap">
        <div class="current"><span>当前所在地：</span><a href="index.html">首页</a>  >> <a href="旅游团购.html">旅游团购</a> </div>	<div class="ftg1">
            <div class="ftgx">@tourDetailRelation.Tour_Desc</div>
            <input type="hidden" value="@tourDetailRelation.Title" id="title"/>
            <div class="ftgx1">
                <div class="ftgx1_left">
                    @foreach (var picture in GroupPicture)
                    {
                        if (picture.TourId == tourDetailRelation.TourId && picture.Is_Master == 0)
                        {
                            <img src="@picture.Pic_Url" id="toupic" border="0">
                        }
                    }
                </div>
                <div class="ftgx1_right">
                    <div class="ftgx1_r1">
                        <div class="ftgx1_r2">￥@tourDetailRelation.DiscountPrice</div>
                        <div class="ftgx1_r3">@Count.data<span>人已使用</span><br><A href="旅游团购 - 详情.html"><input type="image" src="~/images/ftgbtn1.png"></A></div>
                    </div>
                    <div class="ftgx1_r4">
                        <p class="ftgp1">市场价： ¥@tourDetailRelation.Price   折扣：@tourDetailRelation.Discount    最多节省：@price<span>元</span></p>
                        <p class="ftgp2">
                            出发地:  <span id="startPlace">@tourDetailRelation.StartPlace</span><br>
                            目的地:  @tourDetailRelation.EndPlace<br>
                            出游天数： @tourDetailRelation.TourDays<br>
                            类型：
                            @if (tourDetailRelation.TourType == 0)
                            {
                                <span>自由行</span>
                            }
                            else if (tourDetailRelation.TourType == 1)
                            {
                                <span>自驾车旅游</span>
                            }
                            else
                            {
                                <span>跟团旅游</span>
                            }
                            <br>
                            发团日期： <span id="starttime">@tourDetailRelation.StartTime</span> 至 <span id="endtime">@tourDetailRelation.EndTime</span><br>
                            剩余天数： @tourDetailRelation.RemanentDays<span>天</span><br>
                            <img src="~/images/ftgicon3.png">&nbsp;分享给朋友：&nbsp;<img src="~/images/ftgicon4.png" align="absmiddle">&nbsp;&nbsp;<img src="~/images/ftgicon5.png" align="absmiddle">&nbsp;&nbsp;<img src="~/images/ftgicon6.png" align="absmiddle">&nbsp;&nbsp;<img src="~/images/ftgicon7.png" align="absmiddle">&nbsp;&nbsp;<img src="~/images/ftgicon8.png" align="absmiddle">&nbsp;&nbsp;<img src="~/images/ftgicon9.png" align="absmiddle">&nbsp;
                        </p>
                    </div>
                </div>
                <br style="clear:both">
            </div>
        </div>
        <div class="ftg4">
            <div class="ftg4_top">
                <ul>
                    <li class="f6">团购详情</li>
                    <li>团购提示</li>
                    <li>用户评论</li>
                </ul>
            </div>
            <div class="ftg4_m">

                <p class="ftgp3">
                    <div class="calendar">
                        <div class="outer clearfix" id="calendarcontainer"></div>
                    </div>
                    @*<img src="~/images/ftgpic3.png">*@
                </p>


                <p class="ftgp3">
                    <span class="ftgspan4"><img src="~/images/ftgpic4.png"></span>
                    <span class="ftgspan5">
                        产品特色<br>
                        推荐理由：<br>
                        1、超值飞行体验<br>
                        选用优质航班，尽享舒适乘机体验！<br>
                        2、超级性价比推荐 <br>
                        精选美国Daysinn酒店管理集团旗下顶级度假酒店--三亚万嘉戴斯度假酒店高级海景房2晚，壮丽南中国海景一览无余！
                        更有超大户外泳池，独立酒店专属沙滩！大东海宝宏大酒店副楼庭景房2晚，尊享酒店专属沙滩，免税店购物9折！<br>
                        3、前所未有的低价冲击<br>
                        您从任何地方都不可能预定到比我们还低的价格，原因很简单，因为我们亏本销售，我们只赚人气！特价产品限量供应，
                        订完即止！<br>
                        4、燃情预订送大礼 <br>
                        当天咨询并付款验证的客户更可享受以下全部内容： 机场至酒店接机一次 / 78元宝宏自助晚餐抵用金  / 保额10万
                        旅游意外险一份<br>

                        预订说明：<br>
                        1、特价促销产品，为了您的出行方便，请购买前先向商家咨询机位及房源情况，再进行购买！<br>
                        2、不同日期出发航班不同，无法指定航班，请在购买前先电话咨询！<br>
                        3、特价促销产品需至少提前7天进行预订！<br>
                        商家信息：<br>
                        1、更多产品详情请参考商家去哪儿网旗舰店：http://nhrv3.package.qunar.com <br>
                        2、咨询/预约电话：4008-737-727转 1839 <br>
                        套餐详情： <br>
                        插入图片····<br>

                    </span>
                    <br style="clear:both">
                </p>
            </div>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    $(function () {
        $("#starttime").text(Format($("#starttime").text(), "yyyy-MM-dd "));
        $("#endtime").text(Format($("#endtime").text(), "yyyy-MM-dd "));
    });
    //c:容器,y:年,m:月,a:出发时间json,f:是否显示双日历,fu:回调调
    var para = {
        'c': 'calendarcontainer',
        'y': 2014,
        'm': 2,
        'a': {
            'd1': $("#starttime").text(),//最早时间
            'd2': $("#endtime").text()//最晚时间
        },
        'f': 1,//显示双日历用1，单日历用0
        'clickfu': function (to) {//回调函数，to为点击对象，点击日期是调用的函数,参数to为点击的日期的节点对象，可以把用户选定的日期通过此函数存入服务端或cookies，具体请自行编写
            if (to.id != "") {
                window.location.href = "/Home/Group_Booking?title=" + $("#title").val() + "&price=" + @tourDetailRelation.DiscountPrice + "&startPlace=" + $("#startPlace").text() + "&&StartTime=" + to.id + "&Pic_Url=" + $("#toupic").attr("src") + "&TourId=" + @tourDetailRelation.TourId;
                //alert(to.id);
            }
        }
        //'showFu': function (d) { //回调函数，d为要显示的当前日期，主要用于判断是否要在该日期的格子里显示出指定的内容，在日期格子里额外显示内容的函数,返回值必须为字符串，参数d为显示的日期对象（日期类型）

        //    if (d.getFullYear() == "2019" && d.getMonth() == "9" && d.getDate() == "21") {
        //        return "<b style=\"color:red\">￥158<\/b>";
        //    }
        //    else {
        //        return "";
        //    }
        //}
    }
    CreateCalendar(para, "para"); //参数前一个是对象，后一个是对象名称
</script>

